<%--
  Created by IntelliJ IDEA.
  User: TYZ
  Date: 2020/3/3
  Time: 20:13
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core"  prefix="c"%>
<!-- f标签 取得jsp一些函数工具 -->
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="f"%>
<!-- 格式化标签 -->
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>

<% String path = request.getContextPath();%>
<script type="text/javascript" src="<%=path%>/js/My97DatePicker/WdatePicker.js"></script>
<html>
<head>
    <title>Title</title>
</head>
<body>
    <form id="updateForm">
        <input type="hidden" name="bookId" value="${t.bookId}">
        图书名称:<input type="text" name="bookName" value="${t.bookName}"><br>
        作者名称:
        <select name="author">
            <option value="-1">请选择</option>
            <c:forEach items="${alist}" var="a">
                <option <c:if test="${t.author==a.authorId}">selected</c:if> value="${a.authorId}">${a.firstName}${a.lastName}</option>
            </c:forEach>
        </select><br>
        出版社:
        <select name="publisher">
            <option value="-1">请选择</option>
            <c:forEach items="${plist}" var="p">
                <option <c:if test="${t.publisher==p.pubId}">selected</c:if> value="${p.pubId}">${p.pubName}</option>
            </c:forEach>
        </select><br>
        出版时间:<input type="text" name="bookDate" value="<fmt:formatDate value="${t.bookDate}" pattern="yyyy-MM-dd HH:mm"/>"  onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})"><br>
        图书价格:<input type="text" name="bookPrice" value="${t.bookPrice}"><br>
        图书类型:
        <select name="bookCategory">
            <option value="-1">请选择</option>
            <c:forEach items="${list}" var="c">
                <option <c:if test="${t.bookCategory==c.catId}">selected</c:if> value="${c.catId}">${c.catName}</option>
            </c:forEach>
        </select><br>
    </form>
</body>
</html>
